package com.sddfp.system.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.UUID;

@RestController
@RequestMapping("/testshow")
public class TestShowController {

    @GetMapping("/demo1")
    public String demo1(){
        return "demo1："+ UUID.randomUUID().toString().replace("-","").substring(0,3);
    }

    @GetMapping("/demo2")
    public String demo2(){
        return "demo2："+ UUID.randomUUID().toString().replace("-","").substring(0,3);
    }
    @GetMapping("/list")
    public String list(HttpServletRequest request) {
        String userId = request.getHeader("userId");
        return "list: "+userId;
    }

}
